<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <head>
        <title>Create User</title>
    </head>
    <body>
        <ui:composition template="../../templates/admin/template.xhtml"> 
            <ui:define name="content">
                <p>Create a New User</p>
                
                <f:view>
                    <h:form>
                        <h1><h:outputText value="Create "/></h1>
                        <h:panelGrid columns="2">
                            <h:outputLabel value="Name:" for="name" />
                            <h:inputText id="name" value="#{adminUsersBean.user.name}" title="Name" />
                            <h:outputLabel value="LastName:" for="lastName" />
                            <h:inputText id="lastName" value="#{adminUsersBean.user.lastName}" title="LastName" />
                             <h:outputLabel value="Email:" for="email" />
                            <h:inputText id="email" value="#{adminUsersBean.user.email}" title="Email" />
                            <h:outputLabel value="Password:" for="password" />
                            <h:inputText id="password" value="#{adminUserBean.user.password}" title="Password" />
                            <h:outputText value="Gender:" />
                            <h:selectOneRadio value="#{adminUsersBean.user.gender}"
                                              required ="true"
                                              requiredMessage="#{msgs.genderRequired}"
                                              >
                                <f:selectItem itemValue="f" itemLabel="female" />
                                <f:selectItem itemValue="m" itemLabel="male" />
                            </h:selectOneRadio>
                            <h:commandButton value="Submit" action="#{adminUsersBean.createUser()}"/>
                        </h:panelGrid>
                    </h:form>
                </f:view>
            </ui:define>
        </ui:composition>
        
        
    </body>
</html>
